<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
$(function(){
	$("#upload_btn").bind("click", function(){
		var fileurl = $("#uploadFile").val().split(".");
		if(fileurl[fileurl.length-1] == "apk"){
			sbl.submit({
				url: burl + "/AppVersionTModel/insert.do",
				data: "uploadApp_table",
				success: function(data){
					if(data.success){
						alert(data.msg);
					}
				}
			});
		} else {
			alert("文件不是App文件！");
		}
	});
});
</script>
</head>
<body>
	<div>
		<form id="uploadApp_table">
			<table>
				<tr>
					<td>名称</td>
					<td><input type="text" id="appName" name="appName" /></td>
				</tr>
				<tr>
					<td>版本号</td>
					<td><input type="text" id="vNo" name="appVersiton" /></td>
				</tr>
				<tr>
					<td>App类型</td>
					<td>
						<input type="radio" name="appCode" value="bajw" checked="checked" />宝安警务
						<input type="radio" name="appCode" value="xlxf" />新乐巡防
					</td>
				</tr>
				<tr>
					<td>App操作系统</td>
					<td>
						<select id="apkType" name="appType">
							<option value="1">Android</option>
							<option value="2">Ios</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>选择文件</td>
					<td> 
						<input type='file' class='btn' name="apk" id="uploadFile" value='浏览...' />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="button" value="上传" id="upload_btn" /> 
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>